package com.quick.util;

import org.gavaghan.geodesy.Ellipsoid;
import org.gavaghan.geodesy.GeodeticCalculator;
import org.gavaghan.geodesy.GlobalCoordinates;

public class LBSUtil {
	/**
	 * 获取距离
	 * @param source 自己坐标
	 * @param target 目标坐标
	 * @return
	 */
	public static Integer distance(GlobalCoordinates source,GlobalCoordinates target) {
	     return  (int) new GeodeticCalculator().calculateGeodeticCurve(Ellipsoid.Sphere, target, source).getEllipsoidalDistance();
	}
}
